<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org"
	xmlns:winter="http://www.winter.org"
	xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorator="/layouts/layout">

<div id="VehiculosGestionFragment"
	th:fragment="VehiculosGestionFragment">
	<winter:output id="mainVehiculoDialogOutput"
		class="winter-form form-container">
		<winter:output id="formVehiculoDialogOutput" class="cabecera">
			<winter:row>
				<winter:column type="col-md-4">
					<winter:inputtext id="chapaInput"
						field="*{vehiculoBuscar.chapa}"
						label="#{label.vehiculo.chapa}"
						labeldisplay="col-xs-4"
						inputdisplay="col-xs-8"
						containerdisplay="row padded"
						class="winter-input-text capitalize">
					</winter:inputtext>
				</winter:column>
				<winter:column type="col-md-4">
					<winter:inputtext id="chasisInput"
						field="*{vehiculoBuscar.nrochasis}" 
						label="#{label.vehiculo.nrochasis}"
						labeldisplay="col-xs-4"
						inputdisplay="col-xs-8"
						containerdisplay="row padded"
						class="winter-input-text capitalize">
					</winter:inputtext>
				</winter:column>
				<winter:column type="col-md-4">
					<winter:inputtext id="serieInput"
						field="*{vehiculoBuscar.nroserie}" 
						label="#{label.vehiculo.nroserie}" 
						labeldisplay="col-xs-4"
						inputdisplay="col-xs-8"
						containerdisplay="row padded"
						class="winter-input-text capitalize">
					</winter:inputtext>
				</winter:column>
			</winter:row>
			<winter:row class="button-panel-right">
				<winter:ajaxsubmit id="@{'BuscarVehiculo'}" form="ControlesForm"
					url="@{'/controles/buscarVehiculo'}"
					update="mainVehiculoDialogOutput" value="Buscar Vehiculo"
					object="controles" showstatus="true" class="btn btn-cyan"
					immediate="true">
				</winter:ajaxsubmit>
			</winter:row>
			<winter:row columns="2">
				<winter:column type="col-md-4">
					<winter:select id="selectMonedaVehiculo"
						field="*{vehiculo.moneda}"
						collection="mon, rowmon : ${controles.monedas}"
						value="@{${mon.id}+'|'+${mon.descripcion}}"
						text="@{${mon.descripcion}}"
						label="#{label.control.naturaleza.moneda}" 
						required="true"
						requiredmessage="#{label.control.naturaleza.moneda.requerido}"
						modern="true"
						showglobalmessage="true">
					</winter:select>
				</winter:column>
				<winter:column type="col-md-4">
					<winter:inputtext id="NuevaVehValor"
						label="#{label.vehiculo.valor.requerido}"
						field="*{vehiculo.valor}"
						placeholder="#{label.vehiculo.valor}"
						labeldisplay="col-xs-4"
						inputdisplay="col-xs-8"
						containerdisplay="row padded"
						class="winter-input-text input-cambio"
						type="float" 
						format="true" 
						thousandsSeparator="."
						decimalSeparator="," 
						decimalLimit="0" 
						required="true"
						requiredimage="/images/icons/exclamation-small-red.png"
						requiredmessage="#{label.vehiculo.valor.requerido}">
					</winter:inputtext>
				</winter:column>
			</winter:row>
			<winter:row class="button-panel-right" padded="true">
				<winter:ajaxSubmit id="GrabarVehiculo" form="ControlesForm"
					oncomplete="@{'Winter.ui.CloseDialog(\'VehiculosModal\')'}"
					url="@{'/controles/grabarVehiculo'}"
					update="VehiculosInclude"
					value="#{label.operaciones.guardar}" class="btn btn-cyan"
					object="controles" showstatus="true" confirmationrequired="false"
					confirmationtext="Esta seguro de que desea confirmar los cambios realizados?"
					process="formVehiculoDialogOutput">
				</winter:ajaxSubmit>
				<winter:ajaxSubmit id="SalirVehiculoButton" form="ControlesForm"
					oncomplete="@{'Winter.ui.CloseDialog(\'VehiculosModal\')'}"
					url="@{'/controles/cancelar/VEHICULO'}"
					update="VehiculosModalOutput, VehiculoOutput"
					value="#{label.operaciones.cancelar}" class="btn btn-danger"
					object="controles" showstatus="true" confirmationrequired="false"
					confirmationtext="Esta seguro de que desea descartar los cambios realizados?"
					immediate="true">
				</winter:ajaxSubmit>
			</winter:row>
		</winter:output>
	</winter:output>
</div>
</html>